class InviteController < ApplicationController

  layout "default"

  def show
  end

  def mail
    user = User.find(session[:user_id])
    
    for i in 1...5 do 
      Invitation.deliver_invitation_from(user, params[:invitation]["email"+i.to_s])
    end
    
    flash[:success] = "Vielen Dank! Wir haben deine Freunde eingeladen!"
    redirect_to :action => :show
  end
end
